package com.runrunfast.fxj.utils;


import com.runrunfast.fxj.vo.ResultVo;

/**
 * @author: 陈胤训
 * @create: 2018-08-08 15:26
 **/
public class ResultVOUtil {

    public static ResultVo success(Object o) {
        ResultVo resultVo = new ResultVo();
        resultVo.setCode(0);
        resultVo.setMsg("成功");
        resultVo.setData(o);
        return resultVo;
    }

    public static ResultVo success() {
        return success(null);
    }

    public static ResultVo error(Integer code, String msg) {
        ResultVo resultVo = new ResultVo();
        resultVo.setCode(code);
        resultVo.setMsg(msg);
        return resultVo;
    }

}
